package F02;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Test7 {
    public static void main(String[] args) throws IOException {

        FileInputStream fis=new FileInputStream("1.txt");
//
//        byte [] bys=new byte[5];
//        int len = fis.read(bys);
//        System.out.println(len);
//        System.out.println();
//        System.out.println(new String (bys));
//
//        len = fis.read(bys);
//        System.out.println(len);
//        System.out.println();
//        System.out.println(new String (bys));
//
        byte [] bys2=new byte[1024];
        int len;
        while((len=fis.read(bys2))!=-1)
        {
            System.out.println(new String (bys2,0,len));
        }


    }
}
